#!/bin/bash
cd /root/opt/source/lilishop
git pull
mvn clean package -DskipTests
docker image rm -f buyer-api
docker build -t buyer-api buyer-api/
docker image rm -f common-api
docker build -t common-api common-api/
docker image rm -f manager-api
docker build -t manager-api manager-api/
docker image rm -f seller-api
docker build -t  seller-api  seller-api/

cd /root/opt/docker
docker-compose -f docker-compose-application.yml kill
docker-compose -f docker-compose-application.yml rm -f
docker-compose -f docker-compose-application.yml -d up